import { GithubOutlined } from '@ant-design/icons';
import { useLocation } from 'react-router-dom';

export const Question = () => {
  const name = localStorage.getItem('tenant_name');
  const location = useLocation(); // 获取当前路由信息

  const shouldShowName = !location.pathname.startsWith('/tenant');

  return (
    <>
      <div
        style={{
          display: 'flex',
          height: 26,
        }}
        onClick={() => {
          window.open('https://gitee.com/JackyCui666');
        }}
      >
        <GithubOutlined />
      </div>
      {shouldShowName && <div>{name}</div>}{' '}
    </>
  );
};
